package com.lst.api.controller;

import com.lst.api.service.ILoanTypeService;
import com.lst.api.vo.CodeAndNameVo;
import com.lst.tools.custom.vo.JsonResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 贷款种类管理表控制层
 *
 * @author Frank
 * @date 2020-02-05 23:28:25
 * @version: V1.0
 */
@Api(tags = "贷款种类管理表控制层")
@RestController
@RequestMapping(value = "/loanType")
public class LoanTypeController {

    @Autowired
    private ILoanTypeService loanTypeService;

    @ApiOperation(value = "获取贷款种类选择信息")
    @GetMapping(value = "/list")
    public JsonResponse<List<CodeAndNameVo>> listAllSelectData() {
        List<CodeAndNameVo> list = loanTypeService.listCodeAndName();
        return JsonResponse.success(list);

    }

}